package com.sg.dto.integration.framework;


import com.sg.common.dto.BaseDto;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.util.Date;
import java.util.Objects;

/**
 * @desc OrgDeptPositionDto
 * @使用场景
 */
@Data
public class OrgDeptPositionDto extends BaseDto implements Serializable {

    /**
     * 组织职务关系ID:
     */
    @ApiModelProperty("组织职务关系ID")
    private String orgPositionRelationshipId;

    /**
     * 所属对象实例ID:
     */
    @ApiModelProperty("所属对象实例ID")
    private String orgEntityId;

    /**
     * 操作人就职记录ID:
     */
    @ApiModelProperty("操作人就职记录ID")
    private String operationInductionId;

    /**
     * 操作时间:
     */
    @ApiModelProperty("操作时间")
    private Date operateTime;
    /**
     * 职务ID:
     */
    @NotNull(message = "职务ID不能为空")
    @ApiModelProperty("职务ID")
    private String positionId;
    /**
     * 所属实例类型编码:
     */
    @NotNull(message = "所属实例类型编码不能为空")
    @ApiModelProperty("所属实例类型编码")
    private String orgTypeCode;
    /**
     * 组织ID:
     */
    @ApiModelProperty("组织ID")
    private String organizationId;
    /**
     * 排序:
     */
    @ApiModelProperty("排序")
    private Long orderNumber;

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        if (!super.equals(o)) return false;
        OrgDeptPositionDto that = (OrgDeptPositionDto) o;
        return orgPositionRelationshipId == that.orgPositionRelationshipId && orgEntityId == that.orgEntityId && operationInductionId == that.operationInductionId && operateTime == that.operateTime && positionId == that.positionId && orgTypeCode == that.orgTypeCode && organizationId == that.organizationId && orderNumber == that.orderNumber;
    }

    @Override
    public int hashCode() {
        return Objects.hash(super.hashCode(), orgPositionRelationshipId, orgEntityId, operationInductionId, operateTime, positionId, orgTypeCode, organizationId, orderNumber);
    }

}
